import {injectReducer} from '../global/reducers'
import reducer from './actions'

export default (title, store) => ({
  path: '/login',
  getComponent(nextState, callback) {
    require.ensure([], require => {
      document.title = title
      injectReducer(store, {key: 'login', reducer})
      callback(null, require('./containers/App'))
    }, 'login')
  }
})
